trigger setLookupAtAchieve  on Achieve__c (before insert) {
        boolean b=true;
        if(system.trigger.isupdate &&
         (trigger.oldmap.get(trigger.new[0].id).NewBornNumber__c==trigger.new[0].NewBornNumber__c
        // trigger.oldmap.get(trigger.new[0].id).HCP_recommendation__c==trigger.new[0].HCP_recommendation__c||
    //     trigger.oldmap.get(trigger.new[0].id).forecast__c==trigger.new[0].forecast__c
         )
        ){
            b=false;
        }
        
        if(b){
        List<id> idl=new list<id>();
      //  List<forecast__c> fl=new list<forecast__c>();
        list<hcp__c> hcpl=new list<hcp__c>();
     //   List<HCP_recommendation__c> hcprec=new list<HCP_recommendation__c>();
        list<NewBornNumber__c> nbnl=new list<NewBornNumber__c>();
        
        for(achieve__c acht:trigger.new){
            idl.add(acht.hospital_name__c);
        }
        nbnl=[select id,month__c,year__c,hospital__c from NewBornNumber__c where hospital__c in:idl AND month__c =: trigger.new[0].month__c AND year__c =: trigger.new[0].year__c ];
    //    fl=[select id,month__c,year__c,hospital__c from forecast__c where hospital__c in:idl];
   //     hcpl=[select id from hcp__c where hospital__c in:idl];
     //   hcprec=[select id,month__c,year__c,hospital_id__c from HCP_recommendation__c where HCP_Name__c in:hcpl];
        
       for(achieve__c ach:trigger.new){
      /*      for(forecast__c f:fl){
                if(ach.month__c==f.month__c && ach.year__c==f.year__c && ach.hospital_name__c==f.hospital__c){
                    ach.forecast__c=f.id;
                }
            }*/
            
            for(NewBornNumber__c nbn:nbnl){
                if(ach.month__c==nbn.month__c && ach.year__c==nbn.year__c && ach.hospital_name__c==nbn.hospital__c){
                    ach.newbornnumber__c=nbn.id;
                }
            }
            
   /*        for(HCP_recommendation__c hcpr:hcprec){
               if(ach.month__c==hcpr.month__c && ach.year__c==hcpr.year__c && ach.hospital_name__c==hcpr.hospital_id__c ){
                    ach.HCP_recommendation__c=hcpr.id;
                }
            }*/
       }
        }
}